package com.xsprite.managesys.bean;

public enum Plat {
	JIUYOU(0, "九游(jiuyouEdition)"),SLL(1, "360(360Edition)"),IOS_DAGUA(2,"ios大挂(iosDaGuaEdition)"),
	IOS_WAIGUA(3,"ios外挂(iosWaiGuaEdition)"),IOS_PB(4, "云顶IOS越狱版(ydiospbEdition)"),
	CHULE_TEST(5, "触乐测试服(chuleTest)");
	
	private int ordinal;
	private String platName;
	
	private Plat(int ordinal, String platName){
		this.ordinal = ordinal;
		this.platName = platName;
	}

	public int getOrdinal() {
		return ordinal;
	}

	public void setOrdinal(int ordinal) {
		this.ordinal = ordinal;
	}

	public String getPlatName() {
		return platName;
	}

	public void setPlatName(String platName) {
		this.platName = platName;
	}
	
	public static Plat getValueByPlatName(String platName){
		for(Plat plat : Plat.values()){
			if(plat.getPlatName().equals(platName)){
				return plat;
			}
		}
		return null;
	}
	
	public static Plat getValueByOrdinal(int ordinal){
		for(Plat plat : Plat.values()){
			if(plat.getOrdinal() == ordinal){
				return plat;
			}
		}
		return null;
	}
	
}
